package com.itcam.phaseiii.thread_;

/**
 * Author:Cammy.Wu
 * Date:2024-05-10
 * Description:
 */

public class ThreadMethodDemo04 {
    /*
        休眠线程的方法
            public static void sleep(long time):让线程休眠指定的时间，单位为毫秒
     */

    public static void main(String[] args) throws InterruptedException {
        for (int i = 5; i >= 0; i--) {
            System.out.println("倒计时: " + i + " seconds");
            Thread.sleep(1000);
        }
    }
}
